package com.itliang.core.model.vo.equipment;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.itliang.utils.easyexcel.EquipmentDataStatusConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 设备数据VO类
 *
 * @author : liangzhuoyuan
 */
@Data
public class DataListVO implements Serializable {


    /**
     * 主键
     */
    @ExcelIgnore
    private Long id;

    /**
     * 采集的设备code
     */
    @ExcelProperty(value = "收集设备编码", index = 0)
    private String equipmentCode;

    /**
     * 采集数据
     */
    @ExcelProperty(value = "数据", index = 1)
    private Double data;

    /**
     * 数据状态 0-未知 1-正常 2-异常
     */
    @ExcelProperty(value = "数据状态", index = 2, converter = EquipmentDataStatusConverter.class)
    private Integer isException;

    /**
     * 正常范围数据表数据类型
     */
    @ExcelIgnore
    private Integer normalRangeDataType;


    /**
     * 最小正常值
     */
    @ExcelProperty(value = "最小正常值", index = 3)
    private Double minData;

    /**
     * 最大正常值
     */
    @ExcelProperty(value = "最大正常值", index = 4)
    private Double maxData;

    /**
     * 收集数据时间
     */
    @ExcelProperty(value = "收集时间", index = 5)
    private Date collectionTime;

    private static final long serialVersionUID = 1L;
}
